package org.shagin.jfin.ui.budget.item;

import java.awt.BorderLayout;

import org.shagin.jfin.core.CoreUtils;
import org.shagin.jfin.core.ui.JJDialog;
import org.shagin.jfin.core.ui.UIUtils;
import org.shagin.jfin.data.model.OperationRuleAction;

/**
 * The Class JOperationRuleActionDialog.
 */
@SuppressWarnings("serial")
public class JOperationRuleActionDialog extends JJDialog {
  
    /**
     * Instantiates a new j operation rule action dialog.
     *
     * @param operationRuleAction the operation rule action
     */
    public JOperationRuleActionDialog(OperationRuleAction operationRuleAction) {
        super();
        CoreUtils.checkNotNull(operationRuleAction, "operationRuleAction");
        setLayout(new BorderLayout());
        JOperationRuleActionPane pane = new JOperationRuleActionPane(
                operationRuleAction);
        getContentPane().add(pane, BorderLayout.CENTER);
        // TODO Size
        setSize(500, 500);
        setTitle(pane.getTitle());
        UIUtils.centerScreen(this);
    }
}
